package com.example.rpc.example.springboot.consumer;

import com.example.rpc.springboot.starter.annotation.RpcReference;
import com.example.rpccommon.model.User;
import com.example.rpccommon.service.UserService;
import org.springframework.stereotype.Service;

@Service
public class ExampleServiceImpl {

    @RpcReference
    private UserService userService;

    public void test() {
        User user = new User();
        user.setName("MouMou");
        User resultUser = userService.getUser(user);
        System.out.println("服务消费者调用服务后收到用户名" + resultUser.getName());
    }

}
